import request from '@/utils/request'

export function list(query) {
    return request({
        url: '/shop/list',
        method: 'get',
        params: query
    })
}
export function delShop(userCode,userCard) {
    return request({
        url: '/shop/dmz/delShop?userCode='+userCode+'&userCard='+userCard,
        method: 'get',
    })
}


export function info(id) {
    return request({
        url: '/shop/info/' + id,
        method: 'get'
    })
}
export function findByUserCode(userCode) {
    return request({
        url: '/shop/dmz/findByUserCode/' + userCode,
        method: 'get'
    })
}

export function save(shop,shopTypes) {
    let data = {shop,shopTypes};
    data.json=true
    return request({
        url: '/shop/save',
        method: 'post',
        data
    })
}
export function saveShop(shop,shopTypes,sysUsersEntity) {
    let data = {shop,shopTypes,sysUsersEntity};
    data.json=true
    return request({
        url: '/shop/dmz/saveShop',
        method: 'post',
        data
    })
}

export function update(shop,shopTypes) {
    let data = {shop,shopTypes};
    data.json=true
    return request({
        url: '/shop/update',
        method: 'post',
        data
    })
}

export function remove(data) {
    return request({
        url: '/shop/delete',
        method: 'post',
        data
    })
}


